﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.ExceptionServices;
using System.Windows.Forms;
using log4net;
using Protobuf_Gui.Controls;
using Protobuf_Gui.Domain;
using Protobuf_Gui.Misc;

namespace Protobuf_Gui
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            LogNetConfig.LoadLog4Net();
            AppDomain.CurrentDomain.FirstChanceException += CurrentDomainFirstChanceException;
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            var main = new Main();
            var app = new MahApp(main);
            app.Run();
        }

        static void CurrentDomainFirstChanceException(object sender, FirstChanceExceptionEventArgs e)
        {
            Console.WriteLine(e.Exception);
        }
    }
}
